function FirstNotRepeatingChar(str)
{
    // write code here
    let hash = {}
    for(let i of str){
      if(hash[i] !== undefined){
        hash[i] = false
      }else{
        hash[i] = true
      }
    }
    for(let i in hash){
      if(hash[i]){
        return str.indexOf(i)
      }
    }
    return -1
}
module.exports = {
    FirstNotRepeatingChar : FirstNotRepeatingChar
};